Jump to content

CentOS Install Website (Notes)


wildweaselmi
 Share

Recommended Posts

Here are some basic's assuming you already have CentOS 5.x installed and SSH up and working.



Make sure your user is a member of the wheel group (check which groups are on your server)



# cat /etc/passwd | cut -d: -f1
# cat /etc/group |cut -d: -f1


or even easier just check to see if the group exist

# grep wheel /etc/group





Add user to group

# /usr/sbin/useradd -G wheel dennis



From the server (if running DHCP or you don't know the IP address) run the following

# /sbin/ifconfig





SSH into the server from your workstation (like my awesome MacBook Pro)

# ssh -C dennis@10.211.55.8





Become root

# sudo su -





Install Screen to help protect your remote session

# yum install screen





SSH into your server and run

# screen -RD





Upgrade packages

# yum upgrade

# reboot





Install web software

# yum -y groupinstall "Web Server" "MySQL Database" "Development Tools"

# yum -y install php-mysql





Download webmin



# cd Desktop

# wget http://prdownloads.sourceforge.net/webadmin/webmin-1.540-1.noarch.rpm

# rpm -Uvh web*rpm









Optional Package

# yum -y install gcc kernel-devel nmap





Configure SSH





# mkdir /etc/banners

# cat > /etc/banners/issue.msg









Authorized users only! This is a private system.

All activity logged real-time to multiple geographically dispersed servers.



ctrl-d on a blank line to end and save file






# vi /etc/ssh/ssh_config - above line that says Host *





Host host2.domain.com

HostbasedAuthentication yes








# service sshd restart

# ssh-keygen -t rsa









Generating public/private rsa key pair.

Enter file in which to save the key (/root/.ssh/id_rsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /root/.ssh/id_rsa.

Your public key has been saved in /root/.ssh/id_rsa.pub.

The key fingerprint is:

D8:04:b5:66:2e:c7:c2:e4:a3:0d:ee:17:2b:4d:f3:5c root@host.domain.com






# cat /root/.ssh/id_rsa.pub | ssh root@host2 'cat >> .ssh/authorized_keys'







The authenticity of host 'host2 (192.168.0.1)' can't be established.

RSA key fingerprint is 37:1a:c4:56:23:ad:c7:38:d5:d8:d8:41:23:4c:af:3c.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'host2,192.168.0.1' (RSA) to the list of known hosts.

Authorized users only! This is a private system.

All activity logged real-time to multiple geographically dispersed servers.

root@host2's password:






# cd /root/.ssh; chmod 600 *



Create directory for websites

# mkdir -p /etc/httpd/vhosts.d





Edit the Apache configuration

# nano /etc/httpd/conf/httpd.conf



(Control + V until you get to the end of the file)

Type after Hosts>

Include vhosts.d/*.conf



Save File and Exit



Create directory for first domain (site)

# mkdir -p /srv/vhosts/network.mywiseguys.net/htdocs







Navigate to the new site folder

# cd /srv/vhosts/network.mywiseguys.net





Either



# wget .gz file

# run tar -xvxf the filename.gz

# mv from newdirectory/* htdocs/

# chown -R apache.apache htdocs/







OR



# copy over an already existing site to /srv/vhosts/network.mywiseguys.net/htdocs

# chown -R apache.apache htdocs/




Double check that apache user and apache group are the owner of the files by typing


# ls -l



Configure SELinux to allow SSH, http and https


# system-config-securitylevel-tui


(change to Permissive and then click Customize and make sure mail, ftp, SSH, http and https are selected. Add ports tcp 995 and tab to OK and OK again to exit)


# reboot



Now from a browser


  1. https://network.mywiseguys.net
  2. login with your username and password
  3. Click on Refresh Modules
  4. Click on Servers and then Apache.

Link to comment
Share on other sites

Don't forget to add ioncube







Go to http://www.ioncube.com/loaders.php





Download



wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz













tar xvfz ioncube_loaders_lin_x86.tar.gz


tar xvfz ioncube_loaders_lin_x86.tar.gz


cd ioncube










Copy loader-wizard.php to location you can access on a web browser.







I then get told that there is an updated script so I down load the latest and update it.



wget http://www.ioncube.com/loader-wizard/loader-wizard.tg


z



tar xvfz loader-wizard.tgz






cp this file to a folder you can access from a browser.







Then follow the instructions;



mkdir /usr/local/ioncube










Copy the downloaded files to /usr/local/ioncube






cp * /usr/local/ioncube


cd /etc/php.d














Download ioncube.ini from from the link on loader-wizard.php page.







But the ioncube.ini in /etc/php.d







Restart you httpd server



service httpd restart





Click on the test link and make sure everything works





Then remove the loader-wizard.php from the folder that is browserable.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...