Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
smf hosting on vps
#1
hi guys today i will show you how to host Smf on Debian7 and unbuntu
first of all you will need to install LAMP if you dont have already on your vps so first i will show you how to install LAMP if you dont have
Before we start the process we should check the repositories are up to date or not
Code:
apt-get update
when this command process completed then start installing Lamp
Step 1 - Install apache
open your vps terminal and type this cmd
Code:
apt-get install apache2
Thats it, now check your apache is installed correctly or not open your browser and type your vps ip and its should display Its works

Step 2 Install mysql
For installing mysql open your vps terminal and type the following commands
Code:
apt-get install mysql-server
During the installation, MySQL will ask you to set a root password give your password and hit enter.
finishing up by runing mysql setup script
Code:
mysql-secure_installation
The prompt will ask you for your current root password.
type it in.
"Enter current password for root (enter for none): 
OK, successfully used password, moving on..."
the prompt will ask you if you want to change password go ahead and type No
its easiest just to say yes for all questions its looks like this
"By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Code:
Remove anonymous users? [Y/n] y                                            
... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
... Success!

By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
... Success!

Cleaning up..."
once you done from here then we can move to our next step of installing PHP

Step Three—Install PHP
Open terminal and type the following command

Code:
apt-get install php5 php-pear php5-mysql
after you answer yes double time the php will install it self
finishing up by installing php
Code:
service apache2 restart
Congrats your LAMP is now installed.

checking result of php
Well Lamp installed now we will create a small php info page
to setup this first create a new file
Code:
nano /var/www/info.php
add the following line in it
Code:
<?php
phpinfo();
?>"
then save it and exit you can save it by pressing Ctrl+O

at last now we will move to install smf on vps
we should also install send mail as it will also send password reset link to forum users
for installing this type the following command in terminal
Code:
apt-get -y install sendmail

Step 2 Create a Database
we will now make SMF database and SMF user with password "password" dont forget to change it in your own value
Code:
mysqladmin create SMF
Code:
mysql -Bse "create user 'SMF'@'localhost' identified by 'PassWord';
Code:
mysql -Bse "grant all privileges on \`SMF\`.* to 'SMF'@'localhost';"
Code:
mysqladmin flush-privileges"[code]

Install simple machine forum
we will download latest smf version which 2.0.11 in now days
open your terminal and type the following commands
[code]"rm -rf /var/www/*

Code:
cd /var/www

Code:
wget http://mirror.ord.simplemachines.org/downloads/smf_2-0-11_install.tar.gz

Code:
tar xvfz smf_2-0-11_install.tar.gz
Code:
rm -rf smf_2-0-11_install.tar.gz"
Set Correct Directory And File Permissions
open terminal and type the following commands
Code:
"cd /var/www
for dirs in attachments avatars cache Packages Packages/installed.list Smileys Themes agreement.txt Settings.php Settings_bak.php; do
Code:
chmod 777 $dirs; done"
now you are done from give your ip adress in your browser like this myipadress/install.php
now you will smf configuration page and fill it with correct details
for database details enter the following details except your password which you changed
Code:
"Server name: localhost
Username: SMF
Password: PassWord
Database name: SMF
Table prefix: smf_"
now when you finish smf configuration then dont forget to delete your install.php by typing the following command
Code:
"rm -rf /var/www/install.php
[/code][/code]
Reply
Thanks given by:
#2
Quite Alot to read but Very Worth it.
Reply
Thanks given by:



Forum Jump:


Users browsing this thread: 1 Guest(s)