Jump to content

Recommended Posts

hey guys i just picked up a VPS running CentOS 4.2 but it didnt come as pre setup as the tech support guy told me it would

 

basicly its got apache no mysql and no php

 

so i was wondering if some one could please point me in the right direction to installing and configureing mysql and php with apache on a CentOS 4.2 box..... im not shore if i posted this in the right please so if an admin descides to move it go ahead but im realy stuck on this one

Link to comment
https://forums.phpfreaks.com/topic/74411-lamp-install/
Share on other sites

Your going to have a seriously hard time maintaining a vps without a bit of Linux knowledge. the first thing you should do is login via ssh and type....

 

man yum

 

This will give you the manual page for the yum paackage manager (CentOS's default I believe). from there you really need to get you hands dirty.

 

Ive not used centOS, but this is a basic rundown of what I had done on my debian VPS prior to installing the smtp server.

 

1000 07/08/07 08:52:12 installed sudo, ran "sudoedit /etc/sudoers"
1001 07/08/07 08:54:18 installed sshd "openssh-server"
1002 07/08/07 08:54:45 configured ssh/sshd to run with on a non default port, denied root login
1003 07/08/07 09:07:27 generated ssh keys and copied relevent files between computers on network
1004 07/08/07 09:07:55 added {oblivion,firewall} to /etc/hosts file
1005 07/08/07 09:08:44 installed (custom) firewall "sudo tar xvpf ~/src/tsp-firewall.tar.gz -C /"
1006 07/08/07 09:09:01 configured then started firewall "sudo /etc/firewall start"
1007 07/08/07 09:10:02 created /home/trq/{bin,etc,lib,src,tmp,var} directory structure
1008 07/08/07 09:10:22 installed note "scp tsp.com:bin/note bin/note"
1009 07/08/07 09:10:39 copied {.bash*,.vimrc} from tsp.com:
1010 07/08/07 09:11:15 copied {.bash*,.vimrc} to /root/
1011 07/08/07 09:20:31 ran "cat /dev/null | sudo tee /etc/{motd,issue,issue.net}"
1012 07/08/07 09:22:09 installed vim "vim ctags vim-scripts"
1013 07/08/07 09:49:33 edited /etc/vim/vimrc
1014 07/08/07 10:06:16 installed ntp
1015 07/08/07 10:29:21 installed screen
1016 07/08/07 20:32:33 installed amp stack "apache2-mpm-prefork php5 php5-cli php5-sqlite php5-mysql mysql-server xml-core"
1017 07/08/07 20:34:22 << START MYSQL
1018 07/08/07 20:36:29   updated mysql root password.
1019 07/08/07 20:36:47   UPDATE mysql.user SET Password = PASSWORD('**********') WHERE User = 'root';
1020 07/08/07 20:38:01   "sed -i -e /^UPDATE/d .mysql_history"
1021 07/08/07 20:41:17   added user trq to mysql
1022 07/08/07 20:41:40   "GRANT ALL PRIVILEGES ON *.* TO trq@localhost IDENTIFIED BY '**********' WITH GRANT OPTION;"
1023 07/08/07 20:43:02   "sed -i -e /^GRANT/d .mysql_history"
1024 07/08/07 20:43:22 >> END MYSQL
1025 08/08/07 11:07:44 << START APACHE
1026 08/08/07 11:08:57   added rewrite.load to /etc/apache2/mods-enabled/
1027 08/08/07 11:09:19   restarted apache
1028 08/08/07 11:19:44   cleaned up the default vhost
1029 08/08/07 11:20:01   created /var/www/tsp
1030 08/08/07 11:20:57   ran "chown -R root:www-data /var/www ; chmod -R 775 /var/www"
1031 08/08/07 11:22:13   added trq to the www-data group
1032 08/08/07 11:32:08   as trq, created /var/www/tsp/foo.php, worked.
1033 08/08/07 13:28:20   restructured a fair bit of the debain layout to suit my needs/style
1034 08/08/07 13:29:20   removed /etc/apache2/sites-available in favour of /etc/apache2/skel
1035 08/08/07 13:30:21   put in place default site config within /etc/apache2/skel
1036 08/08/07 13:30:52   put in place default vhost config within /etc/apache2/skel
1037 08/08/07 13:31:17   removed /etc/apache2/sites-enabled in favour of /etc/apache2/vhosts
1038 08/08/07 13:32:41   instead of linking to /etc/apache2/skel from /etc/apche2/vhost we will copy and modify skell docs
1039 08/08/07 13:33:15   ive also made the process of adding new vhosts rather trivial to achieve via sed replacements
1040 08/08/07 13:37:04   run "cat /etc/apache2/skel/vhosts" to see how
1041 08/08/07 13:48:05 >> END APACHE
1042 09/08/07 10:05:54 << START PHP
1043 09/08/07 10:06:28   edited various options within /etc/php5/apache2/php.ini
1044 09/08/07 10:06:42 >> END PHP

Link to comment
https://forums.phpfreaks.com/topic/74411-lamp-install/#findComment-375992
Share on other sites

well i do have basic linux knowlage but most of it i am makeing up as a go along so done be supprised if there are more and more posts from me getting stuck:P thanks heaps for that its got me off to a good start

 

also "man yum" states no manual entery for yum according to http://wiki.centos.org/PackageManagement/Yum/ yum is the default package manager the server is hosted with serverpowered

 

and find / | grep yum

reveals

/etc/yum.repos.d

/etc/yum.repos.d/CentOS-Base.repo

/etc/yum.repos.d/CentOS-Media.repo

 

anyone able to point me in the right direction....

Link to comment
https://forums.phpfreaks.com/topic/74411-lamp-install/#findComment-376000
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.