I’m not sure how you mistype the heading on your facebook ad.
After getting everything setup how I want on my web server I want to record how I did it. I know the right thing to do would be to create an image, but I’m just going to write it down instead. That way you can use it if you ever need it.
Thanks to Anant Garg for this part. I’m only going to make a few changes to update things and such.
sudo apt-get install apache2 libapache2-mod-python libapache2-svn python-setuptools subversion python-subversion sudo easy_install http://ftp.edgewall.com/pub/trac/Trac-0.11.4.tar.gz sudo mkdir /svn sudo mkdir /trac sudo htpasswd -cm /etc/svnauth myname sudo htpasswd -m /etc/svnauth myfriendsname
Create a permissions file, “/etc/svnaccess”
[groups] developers = myname, myfriendsname [ / ] @developers = rw * = r
Now create the Apache config file, “/etc/apache2/sites-available/svntrac”
<VirtualHost [ip address]:80> ServerAdmin your@email.com ServerName <URL> DocumentRoot /var/www/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/error.log LogLevel warn CustomLog /var/log/apache2/access.log combined ServerSignature On <Location /svn> DAV svn SVNParentPath /svn AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/svnauth <LimitExcept GET PROPFIND OPTIONS REPORT> Require valid-user </LimitExcept> AuthzSVNAccessFile /etc/svnaccess </Location> <Location /trac> SetHandler mod_python PythonHandler trac.web.modpython_frontend PythonOption TracEnvParentDir /trac PythonOption TracUriRoot /trac </Location> <Location /trac/*/login> AuthType Basic AuthName "Trac" AuthUserFile /etc/svnauth Require valid-user </Location> </VirtualHost>
Now I have to activate the new config file and change the permissions.
sudo a2ensite svntrac sudo /etc/init.d/apache2 reload sudo chown -R www-data /trac
Now create, “/etc/trac.ini”
[header_logo] alt = Logo height = -1 link = src = /trac-files/logo.png width = -1
The logo.png file will go in “/var/www/trac-files”.
Now I create a perl script called init.pl. I wouldn’t have done this, but it was on the tutorial and it is actually really handy.
#!/usr/bin/perl
$sName = $ARGV[0];
$lName = $ARGV[1];
if ($lName eq "") {
$lName = $sName;
}
$sName =~ tr/A-Z/a-z/;
$path = "sudo svnadmin create /svn/$sName";
system ($path);
$path = "sudo chown -R www-data /svn/$sName";
system ($path);
$path = "sudo trac-admin /trac/$sName initenv '$lName' 'sqlite:db/trac.db' 'svn' '/svn/$sName' --inherit=/etc/trac.ini";
system ($path);
$path = "sudo chown -R www-data /trac/$sName";
system ($path);
$path = "sudo trac-admin /trac/$sName permission add yourusername TRAC_ADMIN permission list yourusername";
system ($path);
print "Done!\n\n";
Now, when you run this it will look something like this.
sudo perl init.pl 'short' 'long'
The ’short is obviously the short name and the ‘long’ is the long name. If you don’t have a long name you can leave that part out, the script will just use the short name.
Thanks to Anant Garg, for this part of the tutorial. My only real reason for posting this part is to make sure I don’t lose it.
The first thing I want to do now is make the IP address static. I can’t forget to do that. So I have to open the “/etc/network/interfaces” file.
Change this:
auto eth0 iface eth0 inet dhcp
to this:
auto eth0 iface eth0 inet static address 192.168.1.100 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1
Make sure to change “dhcp” to “static”. Then restart networking.
sudo /etc/init.d/networking restart
sudo apt-get install apache2 sudo apt-get install php5 sudo apt-get install libapache2-mod-php5 sudo /etc/init.d/apache2 restart sudo apt-get install mysql-server sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
Now let’s add the following to “/etc/apache2/apache2.conf”:
# Include phpmyadmin configuration Include /etc/phpmyadmin/apache.conf
and restart apache. Then finish setting upu phpMyAdmin:
sudo apt-get install php5-mysql mysql-client
and add “extensions=mysql.so” to “/etc/php5/apache2/php.ini” and restart apache 1 last time.
Finally, Let’s add an FTP server:
sudo apt-get install proftpd ucf
Select ‘standalone‘ when asked to chose between ‘inetd’ and ’standalone’.
Add the “DefaultChdir” as “/var/www” and restart the web server.
Thanks to HowtoForge for this part of the tutorial.
In the past three days, I think I’ve spent more time working in the linux command line than all the other times combined. It has been my goal for awhile to get my servers all running linux here too, but big problem was always Trac and SVN. I knew it would be a pain, but since I was on spring break this week I decided that this was the time to do it.
Setting up a LAMP server is no big deal, I’ve done it several times. I’m at the point where I can fly through the intsall in no time. The big problem I had was getting trac and svn setup and then moved over with everything intact.
On Friday night, after some searching Google for tutorials on moving Trac and SVN, I found Subversion + Trac for Multiple Projects (One Click Build) by Anant Garg. This really saved me. It was a great tutorial that went through every step line by line. It might have taken me a couple of times to figure it out, but eventually I got the whole thing setup and moved over to a virtual machine. This was my backup. I knew once I had the virtual machine setup and everything was working that I’d be able to get it moved back to the web server once I had linux on it.
This is where the real problems started. I’ve never had as many problems getting an operating system installed in my life. At first it wouldn’t even go to the installer. It kept dropping back to BusyBox (I think it’s a lack of RAM). Eventually, after about 25 tries, I got it to go through the installer. When it restarted it went back to BusyBox. The stuff I read online about getting past BusyBox didn’t work, I couldn’t even install the alternate version of Ubuntu. I finally gave up last night at 11:30 and walked away. This morning when I went to retrieve my keyboard I noticed that it was still looping through the BusyBox cycle. I typed ‘exit’, and it quit BusyBox and booted into the OS. I couldn’t beleive it. After all that all I had to do was type ‘exit’. I later found out that you have to wait for 3 or 4 minutes after it boots up to quit BusyBox (again, I think more RAM would fix the problem).
Once I got the server all setup and running, I had a small problem moving everything back over, but once I figured out that I had to change a path in one of the configuration files I was up and running.
This install is even more usefull than the previous one. I’m really liking it.