PDA

View Full Version : How-To setup a brand new 1and1 ROOT I,II, or III server


eWebtricity
05-13-2005, 04:19 PM
>> Last tested on a freshly re-imaged Root III server running FC3 and Plesk 7.5.4 on 04/04/06 <<

STEP 1

SSH to the server and change the root passwd


[root@server root]# passwd


STEP 2

Login to the Plesk web GUI and change the admin password by going to SERVER in the left column then CHANGE PASSWORD on the right.

Note *** when you login for the first time to a new server it may have an alert message at the top that reads, if it doesn't then move on to step 3.


"You are currently operating with a limited product license that requires registration prior to activating the full feature set. To update your product license select the Retrieve Keys option from within License Manager."
that you are running a limited Plesk license and need to go to the license manager to update the license. Just follow the prompts to "Retrieve Keys". You will need to do this to continue on with the rest of the steps in this tutorial.

Beware if this process fails then 1and1 support needs to enable the "ports" as they call it to let you retrieve your Plesk keys. Call them directly as email normally takes two days to turn around for them for some reason.


STEP 3

Next you can change the server hostname by going to the left hand menu and choosing SERVER and then PREFERENCES on the right.

STEP 4

Update the contact information, this is also the admin email address where Plesk event notifications are sent. (ie: when updating this is where it sends update notifications and error message by default). Go to SERVER in the left column and then EDIT on the right.

STEP 5

The Plesk updater utility uses the /opt directory to cache files during updates, but the current partition that the /opt directory lives on is too small and must have at least 300MB free space. I'm sure 1and1 will change this at some point but until they do you can simply move the /opt directory to a larger partition and create a symlink to it.


# cd /
# mv /opt /home
# ln -s /home/opt ./opt


STEP 6

Next run the built in Plesk "Updater" utility to fetch and install all the latest Plesk v7.5 base packages update. This will install the new autoinstaller3 utility which is required to upgrade to the new Plesk v8.0

STEP 7

Once the 7.5 base package update completes you can return to the updater and notice you will see Plesk v8.0 is now available. It is advised to only upgrade the base package first to v8.0 then come back if it's successful to upgrade the remaining packages.

STEP 8

If the Plesk v8.0 base package upgrade was successful, next run the built in Plesk "Updater" utility to fetch and install all the latest Plesk updates for v8.0 by going to SERVER on the left column menu and then choosing UPDATER icon from the right side menu and follow the prompts to select the updates to install. I choose to install all the available updates at once.

STEP 7

Edit the /etc/yum.conf file and add this section



# prevents the kernel from being upgraded automatically
exclude=kernel*

[psa-7.5]
name=Atomic Rocket Turtle - $releasever - SW-Soft PSA 7.5 RPMS
baseurl=http://3es.atomicrocketturtle.com/atomic/psa-7.5/$releasever/
#baseurl=http://www.atomicrocketturtle.com/atomic/psa-7.5/$releasever/

# Update mirrors for Fedora, Fedoralegacy, and CentOS 3/4
[base]
name=Atomic Rocket Turtle - $releasever - Base OS RPMS mirror
baseurl=http://3es.atomicrocketturtle.com/3rd-party/base/$releasever/

[updates]
name=Atomic Rocket Turtle - $releasever - OS Update RPMS mirror
baseurl=http://3es.atomicrocketturtle.com/3rd-party/updates/$releasever/

[atomic]
name=Atomic Rocket Turtle - $releasever - Atomic PSA-Compatible RPMS
baseurl=http://3es.atomicrocketturtle.com/atomic/art/$releasever/


Then run 'yum update' from the command line to update to the latest PSA compatible apps.

STEP 8

If you chose to upgrade MySQL you will most likely be upgrading from a 3.x to a 4.x version. After the upgrade you will most likely be unable to access Plesk or anything else that requires MySQL until you run the upgrade script to correct the table privileges.

Run the MySQL grant tables upgrade script



[root@server cron.daily]# mysql_fix_privilege_tables --user=admin --password=`cat /etc/psa/.psa.shadow`
This scripts updates the mysql.user, mysql.db, mysql.host and the
mysql.func tables to MySQL 3.22.14 and above.

This is needed if you want to use the new GRANT functions,
CREATE AGGREGATE FUNCTION or want to use the more secure passwords in 3.23

If you get 'Access denied' errors, you should run this script again
and give the MySQL root user password as an argument!
Converting all privilege tables to MyISAM format

If your tables are already up to date or partially up to date you will
get some warnings about 'Duplicated column name'. You can safely ignore these!
ERROR 1060 at line 2: Duplicate column name 'File_priv'

Creating Grant Alter and Index privileges if they don't exists
You can ignore any Duplicate column errors
ERROR 1060 at line 1: Duplicate column name 'Grant_priv'
ERROR 1060 at line 2: Duplicate column name 'Grant_priv'
ERROR 1060 at line 3: Duplicate column name 'Grant_priv'

Setting default privileges for the new grant, index and alter privileges

Adding columns needed by GRANT .. REQUIRE (openssl)
You can ignore any Duplicate column errors

Creating the new table and column privilege tables
Changing name of columns_priv.Type -> columns_priv.Column_priv
You can ignore any Unknown column errors from this
ERROR 1054 at line 1: Unknown column 'Type' in 'columns_priv'

Fixing the func table
You can ignore any Duplicate column errors
ERROR 1060 at line 1: Duplicate column name 'type'

Adding new fields used by MySQL 4.0.2 to the privilege tables
You can ignore any Duplicate column errors

Updating new privileges in MySQL 4.0.2 from old ones

ERROR 1061 at line 5: Duplicate key name 'Grantor'



Restart MySQL just to make sure all changes take effect and there are no problems.


[root@server cron.daily]# service mysqld restart
Stopping MySQL: [ OK ]
Starting MySQL: [ OK ]
[root@sirius cron.daily]#

Version check after upgrade


[root@server etc]# mysql -V
mysql Ver 12.22 Distrib 4.0.23a, for pc-linux-gnu (i686)
[root@sirius etc]#


Check to make sure everything is still working with MySQL or just login to the Plesk control panel. If your successful then the upgrade was also a success.

STEP 9

Download Zend Optimizer from http://www.zend.com/store/products/zend-optimizer.php and install the PHP optimizer.

Download ZendOptimizer-2.5.10a-linux-glibc21-i386.tar.gz

Decompress it and run the installer "install.sh"

Walk through the prompts and accept the defaults

Note: I've noticed on the latest 1and1 FC2 with Plesk 7.5.3 image that Apache fails to restart. This appears to be related to the Ioncube.ini file loading the module. I comment that out in the /etc/php.d directory and everything has been fine. I'll try to go back and figure out what's wrong there later.

sholzy
05-13-2005, 05:52 PM
This should apply to all 1 and 1 Root servers, not just the root III server.

krawhitham
09-25-2005, 03:19 PM
This should apply to all 1 and 1 Root servers, not just the root III server.

reimaged drive, starting clean

edited the yum,conf file
ran yum update

Resolving dependencies
.conflict between spamassassin and psa-spamassassin

eWebtricity
09-26-2005, 06:00 PM
I haven't completed this tutorial yet, so it's a little incomplete at the moment. You are correct, you can't download the Zend install binary with wget becuase of the way they offer the downloads. You will have to download the binary to your PC and then FTP up to your server. I try to store all of my downloads/installs in the /usr/local/src directory to keep everything organized.

Hope this helps.

Kan
10-06-2005, 06:09 AM
quick questions, do i need to untar that to a specific location, and can i run that as a client or does it need to be ran as root?

eWebtricity
10-07-2005, 12:50 PM
You can untar it anywhere, I try to keep all that kind of stuff together in one place for organizational sake. I would run it as root to make sure it has full access to do what it needs to do which is mostly copy the binaries to different locations and create symlinks and backup copies of the php.ini file, etc ....

valery
10-26-2005, 07:25 PM
Many thanks for your tips!

Kan
11-23-2005, 12:56 PM
been a while since i have been around here but recently i tried running yum update and everything was successful but now im getting this error, "ERROR: Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 0: /usr/local/psa/admin/auto_prepend/auth.php3:81 psaerror(string "Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)")" any help on how to fix this would be great

eski009
11-23-2005, 02:12 PM
Cheers for this... If I sort out my other problems (see 'Numerous problems' thread) then I will do this.

I would like to add mcrypt/mhash functionality to php. What is the best way to recompile php with this or is there a YUM way of installing it?

eWebtricity
11-23-2005, 03:30 PM
Look at the tutorial on using yum with ART's yum repository, he builds RPM packages specifically for Plesk and popular flavors of linux. The packages are all usually precompiled with the proper options you need, you can check his forums to confirm anything specific at http://www.atomicrocketturtle.com

eski009
11-25-2005, 01:28 PM
Reimage happened today..

just tried to do a yum update after configuring yum.conf and I get this error...


warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID 5ebd2744
public key not available for php-mbstring-4.4.1-1.rhfc3.art.i386.rpm

any ideas?

eWebtricity
11-25-2005, 02:46 PM
looks like your missing the public key (gpg key)

eski009
12-01-2005, 12:25 AM
I am now too getting the following error ERROR: Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 0: /usr/local/psa/admin/auto_prepend/auth.php3:81 psaerror(string "Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)")

How do you fix this?

eWebtricity
12-01-2005, 12:10 PM
is MySQL running ?

do a


ps aux | grep mysql


or a


netstat -an


and look for


tcp 0.0.0.0/3306 listening


or something like that

eski009
12-01-2005, 02:18 PM
thanks,

but I rebooted the server and everything started working again!

hmmm...

Whats the best way to install mcrypt for php?
Also, any ideas about the SMTP problem?

eWebtricity
12-02-2005, 12:03 PM
see your other thread on the SMTP issue

mkpeacock
01-10-2006, 01:58 AM
I've done the edits in the Yum file, I ran the yum update, but when I try to do a yum upgrade mysql it just says No Upgrades available for mysql :(

mkpeacock
01-11-2006, 09:57 PM
I have upgraded PHP and MySQL as detailed here, but any pages which use MySQL are just loading at an appauling speed. Often I get "The connection has timed out" sometimes I get about 5-6 pages running at normal speed, then really slow then timed out.

Anyone know of any solution to this?

Cheers :(

eWebtricity
01-13-2006, 12:10 AM
you might check your /etc/my.cnf file

maybe download mytop from Jeremy Zawadony to checkout the MySQL performance

Does top show MySQL consuming alot of CPU and memory?

dan.plifeye
01-30-2006, 08:54 PM
Just ran this tutorial on my UK Root 1 server running FC3 and everything worked fine.
PHP has been upgraded to 4.4.1 and MySQL to 4.1.15 as well as heaps of other stuff too.
I had to restart the server for MySQL to start workin properly tho.

Good work eWeb'! :)

dan.plifeye
01-30-2006, 09:01 PM
Yup. Everything fine :D

snowboarder04
02-03-2006, 12:24 PM
my server just died due to a corrupted Plesk update. Apache refuses to start. Roughly how long does it take for 1and1 to process a re-image request? We're talking about a 1and1 uk server here.

eWebtricity
02-03-2006, 03:04 PM
within the hour when we did a few days ago, but that was a US 1and1 Root III. I think it's completely automated.

nullensc
02-05-2006, 09:10 PM
Thanks for this tutorial - just upgraded MySql and PHP very successfully on my UK Root Server 1 - didn't even need to restart MySQL though I'll try it tomorrow night.

re this error:

warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID 5ebd2744
public key not available for php-mbstring-4.4.1-1.rhfc3.art.i386.rpm


I read on http://www.pleskaddons.com/forum/4_22_0.html that gpgcheck in /etc/yum.conf should be set =0 to force a key download. This worked for me anyway.

Cheers,
Charles