Yo, I've been looking around a bit & have not find any decent/clear thread on how to setup a website & server on linux fast/ without complaints.. Therefor I created this thread that can MAYBE be a sticky later on
This tutorial is for people who actually are willing to invest into a dedicated server & will/can have thier server ready same day, It looks harder than what it is but if you can't put little time on this then you shouldn't start any server. Enjoy!
This tutorial is for people who actually are willing to invest into a dedicated server & will/can have thier server ready same day, It looks harder than what it is but if you can't put little time on this then you shouldn't start any server. Enjoy!
1. Open putty or any kind of ssh program & log into your dedicated server.
2. Type down the following commands..
#sudo su
- Enter your root password
#apt-get install mysql-server mysql-client
- New password for the MySQL "root" user: <-- yourrootsqlpassword
- Repeat password for the MySQL "root" user: <-- yourrootsqlpassword
#apt-get install lighttpd
#apt-get install php5-cgi
#apt-get install nano
#nano /etc/php5/cgi/php.ini
- Search(ctrl+w) for "cgi.fix_pathinfo=1".. If you find this then you are doing this right!
#lighttpd-enable-mod fastcgi
#lighttpd-enable-mod fastcgi-php
#/etc/init.d/lighttpd force-reload
- Now go to your web-browser & go to http://yourdedicatedserverip/index.lighttpd.html/ & it should work!
#apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
#/etc/init.d/lighttpd restart
#apt-get install phpmyadmin
- Choose [*] lighttpd
- Enter same password as mysql.
- Now you have installed Website+phpmyadmin.
- To make it more secure, you need to change url of phpmyadmin path & add a bit dos protection.. Just type the following codes below in terminal.
#mv /usr/share/phpmyadmin /usr/share/phpmyadmin1234*
*This is your new path name.. etc. http://yourdedicatedserverip/phpmyadmin1234/
#netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
#wget http://www.inetbase.com/scripts/ddos/install.sh
#chmod 0700 install.sh
#./install.sh
3. Now you want your own layout and website files.. (www/htdocs).
#chmod 777 /var
- Delete /var/www on the dedicated server
- Change name of htdocs to www
- Transfer it via WinSCP or any kind of transfer program to /var/
#chmod 777 /var
- open /var/www/config/config.ini & change path to /home/serverfolder
4. Before we can compile sources you need to have them.. so you need to download sources & transfer your serverfolder to the dedicated server(i would suggest into /home/..
- Use your own sources or download sources at your needs HERE.
- Transfer your server to the dedicated server (/home/) by using WinSCP or any kind of transfer program.
5. Now we will compile the server by typing the following below.
#apt-get install libboost1.41-dev libboost-system1.41-dev libboost-filesystem1.41-dev libboost-date-time1.41-dev libboost-regex1.41-dev libboost-thread1.41-dev libgmp3-dev liblua5.1-0 liblua5.1-0-dev liblua50 liblua50-dev liblualib50 liblualib50-dev lua50 lua5.1 libsqlite0-dev libsqlite3-dev sqlite3 libmysql++-dev libmysqlclient-dev mysql-client-5.1 mysql-server-5.1 mysql-common libxml2-dev libxml++2.6-dev cpp gcc g++ make automake autoconf pkg-config subversion liblua5.1-sql-mysql-dev liblua5.1-sql-sqlite3-dev zlib1g-dev zlib1g libcrypto++-dev libcrypto++8
#chmod 777 -R /home/sourcesfolder
#cd /home/sourcesfolder
#./autogen.sh
#./configure --enable-mysql --enable-server-diag --enable-root-permission
#nano Makefile
- Search(ctrl+w) for "OPT".. If you find this then you can add "-D__WAR_SYSTEM__"
- Press ctrl+o, enter & then ctrl+X.
#make
- Wait until it's done and then continue.
#chmod +x /home/sourcefolder/theforgottenserver
#cp /home/sourcefolder/theforgottenserver /home/serverfolder/theforgottenserver
Command for starting server & restarting when crashin & closing it.:
#cd /home/serverfolder
command for starting server:
#./theforgotten
command for closing server:
#ctrl+c
command for starting server and restarts automatic if crashed:
#while true; do ./theforgottenserver; done
When you run server on dedicated you need to attach ./theforgottenserver orelse it will close when you close putty. To avoid that do the following.
#cd /home/serverfolder
#screen ./theforgottenserver
- Press CTRL+A+D to close putty without closing server
#screen -r
- This is if you want to show the servers terminal again.
Now your done! Congratz & don't forget to rep me if i helped you!:w00t:
Last edited: