Posts

Showing posts with the label linux

Setup Samba server on Centos 6.2

After a long struggle I finally figured out how to setup a Samba server on Centos 6.2. Since Centos 6.2 doesn't have the Samba configuration GUI anymore I didn't know how to set it up. But after a lot of trial and error and my friend Google I manages to get it up and running without disabling SELinux :-). On a fresh installation of Centos 6.2 you need to follow the following steps: Install semanage  with yum yum -y install policycoreutils-python Configure the samba configuration file: /etc/samba/smb.conf [global] workgroup = yourworkgroupname server string = yourservername security = user passdb backend = tdbsam Configure your share in the same file [share] path = /your/share/path writable = yes guest ok = yes Set your samba password for your user by logging in with that user on the target machine and execute the following command: smbpasswd Open the Samba ports on your firewall [139/tcp,445/tcp,137/udp,138/udp] Now it's time for configuring SELinux. Enable the do...

Configure Tomcat as a deamon on Linux

Since I keep on forgetting how to do this I decided to put this on my blog to make it easier for me and other people that have the same issue as me. It's pretty simple actually but yesterday I caught myself forgetting how it needs to be done. Basically you need to follow to following steps to successfully. Step 1 - Creating startup deamon file You can take the following file and adjust it accordingly. You have to create this file in /etc/init.d/. #Jenkins startup script #!/bin/sh -e #Jenkins startup script #chkconfig: 2345 80 05 #description: Jenkins CI # Define some variables # Name of app APP=Jenkins # Name of the user to run as USER=tomcat # Location of application's bin directory BASE=/var/tomcat/instances/jenkins # Location of Java JDK export JAVA_HOME=/opt/java/jdk1.6.0_11 case "$1" in # Start command start) echo "Starting $APP" /bin/su -m $USER -c "cd $BASE/logs && $BASE/bin/startup.sh &> /dev/null" ;; # Stop...

Setup Postgres on Fedora Linux 10

Installing PostgreSQL on Fedora Linux 10 is pretty straight forward. You need to follow the following steps: #1 Initialize postgres initdb /var/lib/pgsql/data #2 Add the following line to pg_hba.conf: local all all trust #3 Switch to postgres user su postgres #4 Connect to PostgreSQL psql -d template1 #5 Change password ALTER USER postgres WITH PASSWORD 'this_is_my_password'; #6 Remove line from step 2

How to install Java in Fedora Core

By default, Fedora Core 6 systems come with an old Java software installed, so you need to install a newer version of Java Runtime Environment to enjoy all the Java applications out there. In this quick guide, I will teach you how to update/install your Java Environment. Let's begin by downloading the latest version of JRE (Java Runtime Environment) from here. Just click on the Download link where it says Java Runtime Environment (JRE) 5.0 Update, then you'll need to accept the license and download the Linux self-extracting file. WARNING: Please remember to always replace the xx from the jre-1_5_0_xx-linux-i586.bin file with the latest version. At the moment of this guide's writing, the latest version was 09, so the file should look like this: jre-1_5_0_09-linux-i586.bin After you have finished downloading the file, you need to move it into the /opt folder. Open a console and type: mv jre-1_5_0_xx-linux-i586.bin /opt Now, you will need to make this file executable so yo...