Wampserver to VPS installation with Virtualmin, Ubuntu & MysSql

Permalink
Now that the test site seems to work ok, I'd like to upload to my VPS with Ubuntu, Mysql, Php, Virtualmin, Webmin, etc.
So simple to say, yet it's going to be a massive task, I think. .I should check my versions of software, first.

In moving the site, what should I be uploading?
- Everything below www?
What do I have to change?
- Siteconfig file
- To get Versioning "Htmldif" configured on the Wampserver, Michael Krasnow gave me a directory of files to install, and I changed some paths in config files. Do I need to change those paths back?
- eAccelerator - I am worried about speed, but it appears this no longer works.

- Also should I be installing and starting fresh with the most recent version of Concrete5 5.4.1.1 from Nov 19? is it pretty stable with most of the bugs out (no offense intended)?

- Any other suggestions?

Thanks.

fcgleason
 
Mnkras replied on at Permalink Reply
Mnkras
fcgleason replied on at Permalink Reply
fcgleason
That's a very helpful link. There seems to be some other issues to work out. I do not have PHPmyAdmin on the VPS.

VPS Characteristics:
Operating system Ubuntu Linux 8.04.2
Webmin version 1.510
Virtualmin version 3.82.gpl GPL
Kernel and CPU Linux 2.6.18-194.8.1.el5.028stab070.5 on i686
Local disk space 9.58 GB total, 3.88 GB used
Real memory 2.16 GB total, 498.52 MB used

PHP 5 (must it be PHP 5.2.9-2? I don't know how to set the version back in Virtualmin (basic).

Also do I have to have PHPmyAdmin? - NO I found the Answer herehttp://www.concrete5.org/community/forums/installation/canand039t-i... (second note from Curtis) see his link for MySQL commands to accomplish the import: http://rkutti.wordpress.com/2008/01/08/how-to-create-database-using...

Virtualmin has a very basic MySQL administrator built in. If i can figure out how ot import the Concrete database withll that work? YES
Will I also have to import the PHPmyAdmin databases and tables as well as the backed up Concrete Database? I have to check Michaael's post to determine this, (not needed for the Wampserver installation and transfers) at
http://www.concrete5.org/documentation/installation/moving_a_site... - It looks like the "concrete" database only needs to be exported and imported! with changes to some php files.

Reading up on installing PHPmyAdmin with Virtualmin and Webmin, it looks like people had some troubles installing PhpMyAdmon under Vitrualmin and Webmin (there are so tricky details.)

Thanks for your help and thoughts. I'll post results
Rick
fcgleason replied on at Permalink Reply
fcgleason
The concrete folder and related files take a long time to upload to the server. I'm basically uploading all the files below C:\wamp\www\ to the VPS Server's /home/domain-name/public_html/ It's still going, 3 hours, many data socket failures.
---------------------

Good news. The VIRTUALMIN basic (you do not need Pro) has all the basic functionality necessary to Backup and Restore of mysql databases.

First login using your main root login, pick Edit Database and then add a new database named "concrete". Then select the apropriate domain from the drop down. Then pick Edit Databases, and "Import Database" tab at the top. Import or assign "concrete" to this site. Then restore the database to this server.

You will find the instructions here:
http://wiki.joyent.com/shared:backing-up-databases...

You will find your concrete backup files in the VPS main public directory under /files/backup.

In the Virtualmin mySql utility you can Restore by browsing to this location.

----------------------------------

Backing up a MySQL database (You'll need to know this at some point, but right now we need to know how to Restore the "concrete" database.)

To backup a MySQL database, do the following.
Using Virtualmin

1. Sign in to Virtualmin (see Account logins and important URLs).
2. Select a domain from the drop-down in the left-hand navigation (your main domain should be already selected when you first login to Virtualmin).
3. Click Edit Databases. You should now see a list of your current databases on the Edit Databases page.
4. Select the MySQL database you want to back up from the left-hand column under Database name and click Manage...
5. Click Backup Database. You should now see the Backup Database page.
6. For Backup to file, enter a location on your account where you want the data base to be saved and a suitable filename (e.g., /users/home/yourusername/dbbackup). Clicking … will allow you to browse to a suitable location on your account.
7. Select whether you want all tables to be saved, or just a few specific ones. If you want to back up everything, then just leave All tables selected
8. For Add drop table statements to backup?, leave it as No unless you need a drop table statment
9. Leave Character set for backup as the default
10. Leave Backup compatability format as the default
11. And for Compression format decide whether you want to compress your backup to save space.
12. Now, click Backup Now. You should now see a page confirming a successful backup and your database should be saved in your desired location

And that's it, you've just made a backup of your MySQL database!

-------------------------------------------------

Restoring a MySQL database

To restore a MySQL database, do the following.
Using Virtualmin

1. Sign in to Virtualmin (see Account logins and important URLs).
2. Select a domain from the drop-down in the left-hand navigation (your main domain should be already selected when you first login to Virtualmin).
3. Click Edit Databases. You should now see a list of your current databases on the Edit Databases page.
4. Select the MySQL database you want to restore from the left-hand column under Database name and click Manage...
5. Click Execute SQL. You should now see the Execute SQL page.
6. Near the bottom of the page either enter a location on your account where you want the data base to be restored from for From local file (clicking … will allow you to browse and select the file) or select From uploaded file and click Choose File to select a file from your local machine.
7. For File format, leave it as Tab separated
8. Now, click Execute. You should now see the Import Data page confirming a successful restoration and your MySQL database.

And that's it, you've just restored your MySQL database!

MODIFY CONFIG/SITE.PHP

Now you've got to edit and update your config/site.php file as Michael outlines in the reply above.

I have now two files now WampSite.php and VirtualminSite.php configured appropriately.

TROUBLES

Then if you're having troubles getting green checkmarks on the form when you browse to the site,
1. Clear your browser cookies and cache. Close and open.
2. One person says delete all the files your cache folder. (I've never done this.) mysql error: [-32000: Cache write error]
3. One solution was "I cleared the cache using the concrete debug tool."
4. Another solution was: .htaccess needs to be changed in order for permalinks to be properly used. with the following:
# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /NEWDIRNAME/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
# -- concrete5 urls end --

5. Another solution involved renaming all table names to uppercase. There was a faster way of doing this on the forum afterwards.

Do the first two first if you'r having problems. Check your site.php entries again too.

-------
I AM STUCK RIGHT AT THIS POINT.
I am having a hell of a time. I've tried all of the above, plus reloading all of the concrete files, and trying various passwords and user names Still get :
"Unable to connect to database."
"A database error occurred while processing this request."

At this point I think its because the "root" password for the Mysql DB in Virtualmin is either corrupted or is different in some way than the main login. Hopefully I can get this resolved soon. More Later
fcgleason replied on at Permalink Reply
fcgleason
FIX VERSIONING

To fix Versioning configured for WampServer under Windows I had to change the way Htmldiff worked. PAMB helped me configure, earlier. Now since we are going to a pure Linux VPS I will have to undo those changes.

The changes I originally made are herehttp://www.concrete5.org/community/forums/installation/wampserver2-...
Titled: "Wampserver2.0i htmldiff.py to exe for windows"

Don't worry about the extra folder that was installed.
C:\wamp\www\concrete\concrete\libraries\3rdparty
as folder "htmldiff" with two folders underneath "build" and "dist"

But I do need to reverse the changes made earlier to
/concrete/config/base.php

On Line 331 or nearby, take the comments of this line, as it is the original line, and comment out the next line as follows.

define('DIR_FILES_BIN_HTMLDIFF', DIR_LIBRARIES_3RDPARTY_CORE . '/htmldiff.py');

/* /* Set up for VPS under Linux now. To activate this line for Wampserver-WinXP enabling Versions and htmldiff.exe, see forums for htmldiff download needed, comment out original line above and activate this line.
define('DIR_FILES_BIN_HTMLDIFF', DIR_LIBRARIES_3RDPARTY_CORE . '/htmldiff/dist/htmldiff.exe');
*/

I have two files baseWamp.php and baseVirtual.php set up appropriately.

FIX SAFE MODE

In Virtualmin under Services, PHP Configuration, Safe Mode Options, Enable Safe Mode? - should be set to OFF.
thephilm replied on at Permalink Reply
thephilm
I'm actually writing a blog post about this right now, it's not 100% done, but should be within the next day or so -
http://thephil.net/blog/vps-for-concrete5-how-to/...

I definitely had issues with my PHP version. 5.1 wouldn't let me connect to the marketplace or community. 5.3 gave me some weird issues that I just didn't take the time to trace down.

I had some issues moving existing sites. What I ended up doing was to do a clean install of the same version of the site. The just moved the following:
Packages
Themes
Files/#'d (I don't replace any folders, just copy over the filesets basically. Leave the rest as is...

After moving the database to the new server and updating the site.php, I logged into the dashboard to re-enable the pretty urls.

Good luck, let me know if you have any questions!
-Phil
fcgleason replied on at Permalink Reply
fcgleason
WELL, it is now Dec 15. There were issues with my server and in particular the Mysql database. Evidently from within Webmin with my domain selected, when I applied a unique password to the database "concrete" that I had created, it may have screwed things up. Later I tried "disassociating" the concrete database from that particular domain, and thats when the fun started. To make a long story short, I needed help to reestablish root password access to all of the mysql databases on my VPS. After several days we got it working ok. Now I am going to try to work only in Virtualmin with email and database, creating databases, creating new "Email and FTP access as well as allowing access to particular databases such as "concrete". I am going to avoid setting database passwords when in Webmin, because my Virtualmin/Webmin is setup to use root user and root password for both servers and mysql. so from within Webmin, Do NOT create a root user/ special password for the concrete database! I hope that is clear.

So, within Webmin I created a new database called "concrete". Then within Virtualmin I created a new assigned user, an Email&FTP user, called "concrete5@domainname.org" and during creation of that email user assigned access to the database "concrete".

No you should not use root user/pass.. You should use an assigned user.. As an example the admin user: xxxxx has databse permissions to all databases added under this domain. Or you can add a different user and give database perms.
.
In Virtualmin.. Select the Domain Name from Drop Down menu (left nav) then click on Edit Mail and FTP Users > then select "Add a user to this server." Link along the top.. Then expand: "Other Permissions" and allocate login permissions for the database "Concrete" by selecting in left field and Clicking Arrow to right field. Now email user XXXX@yourdomain.com has access to the "concrete" database. Those are the user and passwords you use in the "site.php" file under the root/config directory!

I then imported the new database to concrete db via file upload using the database utilities within Virtualmin/Webmin

The rest of my experience will be next.
fcgleason replied on at Permalink Reply
fcgleason
This has been a 2 1/2 day experience, with lots of errors, failed data sockets, disconnections, errors. Leaving me without know what had actually completed successfully with a very deep directory structure in Concrete.

I have tried active and pasv modes. Ended up leaving pasv unchecked, letting the server decide which port to upload on Port 21 or 20. Checked our DSL service speed, it was to specs. I call my provider, of course it worked beautify will he was online watching, I uploaded a 5 mb and 35 mb file while we talked about the problem! Then we decided that maybe it would be better to upload at night because the problem was intermittant. Finally last night I did a complete upload overnight, my computer was locked out in the morning and I found out that there were still a number of directories missing. Now I am doing a final FTP upload not overwritting.

Next time I think I am going to try zipping into one file, FTP upload, then install ProFTPD on my server and some ZIP program (which one?) so I can unzip, but at this point I don't know much about this.

I just wanted to do a quick upload to find out about performance on the server! I am apprehensive at this point.

Rick
thephilm replied on at Permalink Reply
thephilm
If you have webmin etc, you should be able to ssh into your site... download putty, and you should be all set in logging in.

Note - I found the best thing to do was to:
1. zip the local folder (note - don't zip the folder, zip all the files and subfolder, otherwise it will try to create that folder on your server)

2. Upload the zip file to your public_html folder.
3. SSH into your server. use the user of the virtual server as the user / pass. This will help with permissions!

4. navigate to the folder - typically just "cd public_html" as you should be in your home directory.
once there you can use the command "ls" to see what files are there. Likely will just be the zip file.

5. To unzip just use the command "unzip filename.zip"

6. type "ls" again to verify all the files / folder structure is correct. Note - it should take almost no time at all to upload the single zip file, while it can take hours to upload all the small files in a Concrete5 install.

Good luck!

Oh -by the way, who is your VPS provider. Have you determined that they are reliable etc? My last VPS provider was pretty bad, there were times my server was nearly unusable and nothing was being accessed.
fcgleason replied on at Permalink Reply
fcgleason
Awesome, that's just what I wanted to do. I have PuTy and use it very occasionally to reboot the server. I guess I should learn the basic Unix commands. Thank you for your help, I believe it will solve those FTP woes!

Provider is called Hosting Pen. They're very helpful, haven't had any speed problems to date. I've been with them for many years, with about 7 websites.

I'm afraid some of my problems have have gotten this thread a bit off track.

Thanks so much.

Rick
fcgleason replied on at Permalink Reply
fcgleason
Last night I had a couple of thoughts.

1. Virtualmin has an SSH loggin under Virtualmin > Webmin Modules > SSH Login I believe we can use those commands in that SSH window, so we can stay within the interface.

2. Since others are going to be editing the website, I am going to need to download the website in order to work on it and possiibly freeze any editing and put a note on the front page to that effect. Therefore I will need to be able to ZIP stuff in my public_html (several directories, basically). I wonder if there is a comparable ZIP command to accomplish that?
thephilm replied on at Permalink Reply
thephilm
I would suggest setting up automated backups with Virtualmin. It can be run daily, and backup each virtual server, it's associated files and databases. That might be the easiest solution for you.
But - to zip the folder and all subfolders - use:
"zip -r data.zip *"
then just download the data.zip file. You'll also have to download the database. I made a subdomain (phpmyadmin.domainname.com) and simply downloaded and unzipped the phpmyadmin there. No Yum or Apt-Get as that seemed to get tricky (installed in /usr/shared). Although I think you can do that also from the virtualmin backend.
-Good luck
Phil
fcgleason replied on at Permalink Reply
fcgleason
Oh thats a nice treat! It works with Virtualmin/Webmin?
I think I am going to try that when I get this site done.
I had been wondering about that because Phpmyadmin has more features, but I found that Virtualmin/Webmin has builtin export and import so I've been using that.

I may have a question for you when I get to that, but you've given me courage and direction to install phpmyadim.

You get a big orange one. How do I add that or does someone else?

Thanks