Announcement

Collapse
No announcement yet.

Install Miva Empresa + Mysql5 + Apache2 Suexec + Php5 on Ubuntu

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • nottheusual1
    replied
    Re: Install Miva Empresa + Mysql5 + Apache2 Suexec + Php5 on Ubuntu

    Did you look at your mysql logs to see what they are saying? In the mysql/php world that usually means a bad .cnf file or mysql isn't running.

    From a command line try "mysqladmin -u root -p admin" and it should ask for a root mysql password if it's running.

    Also, check the permissions on your mysql folder. That's my biggest "doh" moment.

    Leave a comment:


  • Scot - ScotsScripts.com
    replied
    Re: Install Miva Empresa + Mysql5 + Apache2 Suexec + Php5 on Ubuntu

    Ok, I decided to load up a new server. I'm an expert now. And I've created copies of the virtual machine so when I mess it up I don't spend three hours making a new one.

    Now the question is, now that miva script works, how do I get mysql to work? When I create a database in phpmyadmin there isn't any place to create a user or put a password, so I'm wondering what the next step is? One of the main reasons for doing this was to be able use to mysql in a "real" miva environent so I hope this part can be worked out.

    The error I get is:

    MvOPEN_Error: Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)

    I've tried many many solutions but all they do is break the system.

    Do I have to install phpmyadmin into the site I created and run it from there? Any tips on how to do that right if I do?

    Thanks-

    Scot

    Leave a comment:


  • Scot - ScotsScripts.com
    replied
    Re: Install Miva Empresa + Mysql5 + Apache2 Suexec + Php5 on Ubuntu

    Now I've hit a wall. I got phpmyadmin working and created a mysql database. I have a test script that works on a "real" site but is giving me this cryptic looking error:

    MvOPEN: Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)

    So I looked around and found your post from 2010:

    http://extranet.mivamerchant.com/for...sql-mysql-sock

    and followed those steps. Unfortunately now I can't start/stop/restart mysql and of course phpmyadmin can't connect either.

    So I changed the values back to what they were originally, but mysql is still broken, but the error number is now a (2) instead of a (13) (and changed them back and forth several times trying to troubleshoot.)

    One interesting thing I noticed is that before I made those changes, there was no mysql.sock file, only a mysqld.sock file, now there's a mysql.sock file and no mysqld.sock file. Don't know what that means.

    Did I totally mess things up? Do I have to do the whole server reinstall over again? This process is like a roller coaster!

    Leave a comment:


  • Scot - ScotsScripts.com
    replied
    Re: Install Miva Empresa + Mysql5 + Apache2 Suexec + Php5 on Ubuntu

    Ok, I finally figured out the PHPMyadmin stuff. This might be useful in the tutorial as well because they don't have this in the "perfect server setup" tutorial. Once everything is up and running, to get phpmyadmin working you go to the terminal and put this stuff in:



    ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf


    a2enconf phpmyadmin

    service apache2 reload



    Once I did that, I could access the phpmyadmin panel using my ip address: xxx.xxx.xxx.xxx:8081/phpmyadmin

    The last hurdle was figuring out how to log in, and that's by using "root" (no quotes) as the login and the password you put in when setting everything up.

    Leave a comment:


  • Scot - ScotsScripts.com
    replied
    Re: Install Miva Empresa + Mysql5 + Apache2 Suexec + Php5 on Ubuntu

    Thanks for that stuff, I will update my files in the morning.

    On the phpmyadmin thing, can you think of any reasons why it's not coming up like the server install post said it would? The docs say it should come up by putting in either

    http://server1.example.com:8081/phpmyadmin
    or
    http://server1.example.com:8081/phpMyAdmin

    They both come up with page not found. I've tried using the ip address with the same result. Any ideas?

    Leave a comment:


  • Emma
    replied
    Re: Install Miva Empresa + Mysql5 + Apache2 Suexec + Php5 on Ubuntu

    Hi Scot

    I'm glad you could make it work. Indeed there is a line I forgot to specify. If you add a file from your network, it will get "nobody" uid becasue the sharing is done with anonymous account. So, in order to make this work in miva, you'll have to use a small script that will give the right uid to your files. Just paste those lines in a file named updateuid.sh at the root of your virtual host (just below the mivadata and web folder). Please change the uid with your own (web35 and client1 are just an example) :

    Go to your folder

    cd /var/www/yourvirtualhost.com/
    nano updateuid.sh
    paste this :

    #! /bin/bash


    # Change UID & GID for the files newly added from your network
    chown -R web35:client1 web
    # Share newly added files so you can modify them from your network (not to use on a production webserver)
    chmod -R 777 web
    chown -R web35:client1 mivadata
    chmod -R 777 mivadata
    Save and after that just do a :

    chmod +x updateuid.sh
    Now when you add new files, you'll just have to do a small :

    cd /var/www/yourvirtualhost.com/
    ./updateuid.sh
    Thank you for your suggestions, I'll try and make the DNS IP part a little more clear.
    The trick with adding the nobody in the auth file will work only for one virtual host. If you add another one, you'll have the same problem.

    I updated the script installmiva.sh so it will create the "updateuid.sh" file automatically, when you install miva empresa on a new virtual host. So you might want to update it :

    cd /home
    rm -Rf installmiva.sh
    wget http://mivascript.org/download/installmiva.sh
    chmod +x installmiva.sh
    PS: There is a solution for the UID problem. I'll make some tests and let you know, but we might be able to avoid this problem when we add new files on the server from the network.

    Best regards,
    Emma

    Leave a comment:


  • Scot - ScotsScripts.com
    replied
    Re: Install Miva Empresa + Mysql5 + Apache2 Suexec + Php5 on Ubuntu

    Just a quick note, looks like if I the following to the miva.authfile I can edit and compile mivascripts normally and run them from the local server. The only hassle is manually adding this to the file for each domain I create, but at the same time, that's not really a hassle. For anyone that's interested, and new at this, the miva.authfile is located in the /etc directory.

    <AUTH ACCESS = "allow" type="login">
    nobody=/var/www/clients/client1/web2/mivadata
    </AUTH>

    Leave a comment:


  • Scot - ScotsScripts.com
    replied
    Re: Install Miva Empresa + Mysql5 + Apache2 Suexec + Php5 on Ubuntu

    A hack for this seems to be to use 'chgrp' to change it to "client1" and it works.

    However it looks like I have to do this for every new mivascript I make, which is a pain because all the files default to the "nobody" as an owner and "nogroup" as the group.

    Trying to figure out the miva authfile which it seems like it might be able to help, but the docs are broken on miva's site right which makes that a little difficult.

    Leave a comment:


  • Scot - ScotsScripts.com
    replied
    Re: Install Miva Empresa + Mysql5 + Apache2 Suexec + Php5 on Ubuntu

    Having one more problem. The mivadiag.mvc file runs, but if I copy a mivascript from my windows environment in there, I get an error like:

    Configuration Error: 'scot' is not authorized to use Miva Script

    The error above is when I used my ubuntu account to copy the file, if I copy it right from windows, I get:

    Configuration Error: 'nobody' is not authorized to use Miva Script

    How do I add names to the authorized list?

    Thanks,

    Scot

    Leave a comment:


  • Scot - ScotsScripts.com
    replied
    Re: Install Miva Empresa + Mysql5 + Apache2 Suexec + Php5 on Ubuntu

    Ok, final note, it's WORKING.

    After reading up on this stuff, most people edit their windows hosts file so I figured I would try this, and what do you know, not only did the test page come up, but the miva diag file worked as well.

    I'm blown away that this works. It's like a wish come true.

    Thanks very much.

    The only thing I'd add to your tutorial is a more detailed description of the ip address stuff as it relates to windows and the perfect ubuntu install page, that part was kind of confusing. Also maybe include a note that editing the windows hosts file appears to be an easier way of getting things to work.

    Another note, I can only access the ISPconfig screen by bringing up a browser in ubuntu and going to https://server1.example.com:8080/index.php# - using a windows browser brings up an ssl connection error. Maybe that's how it's supposed to work, but it could be confusing for someone.

    One last question- This might be out of the scope of what you're doing here, but the perfect server docs say I should be able to access phpmyadmin with http://server1.example.com:8081/phpmyadmin or http://server1.example.com:8081/phpMyAdmin.

    However they both come up as Not Found. Any ideas?

    Thanks again!

    Scot
    Last edited by Scot - ScotsScripts.com; 05-22-14, 03:34 AM.

    Leave a comment:


  • Scot - ScotsScripts.com
    replied
    Re: Install Miva Empresa + Mysql5 + Apache2 Suexec + Php5 on Ubuntu

    Note- I figured out the sharing, I go there via the IP address and then I can get to all the files in windows.

    Leave a comment:


  • Scot - ScotsScripts.com
    replied
    Re: Install Miva Empresa + Mysql5 + Apache2 Suexec + Php5 on Ubuntu

    Gotcha. Getting closer. When I put my server ip, http://125.215.193.50/, into a browser in windows, I get the the Apache2 Ubuntu Default Page.

    I added my server IP to the DNS in windows 7 and moved it to the top of the list (server IP, and two open DNS entries).

    The IPSconfig is the same as in your article except for the server (example1.server.com) and domain (test.example.com)

    However, when I put in "test.example.com" (my server is server1.example.com, based off the ubuntu install guide - didn't want to change anything, at least until I figure this out) I get the OpenDNS guide page because "test.example.com" is not loading.

    Also, following your example of bringing up to \\MV\test.se.com in the file browser, I put in \\EXAMPLE1\test.example.com but get a popup saying windows can not access it.

    I see that I have test.example.com and web1 folders inside var/www/clients/client1 - guessing that is normal?

    Thanks again for the help. I'm going to keep messing with this and see if there's anything simple I missed in the tutorial.

    Leave a comment:


  • Emma
    replied
    Re: Install Miva Empresa + Mysql5 + Apache2 Suexec + Php5 on Ubuntu

    Well, if you followed the "Perfect Ubuntu Server tutorial", you installed your own DNS server (bind9). Now, in order to use it, you need to change your Windows network settings. On your connection you have the possibility to change default DNS by setting your own IP. More about here: http://www.opennicproject.org/config...-in-windows-7/

    So, your first DNS ip would be the IP of your newly installed server : 125.215.193.50 . And I'd add 2 more, just in case your VirtualBox is off: 208.67.220.220 and 208.67.222.222 (those are the DNS of OpenDns: http://www.opendns.com/opendns-ip-addresses/)

    Hope it helps
    Emma

    Leave a comment:


  • Scot - ScotsScripts.com
    replied
    Re: Install Miva Empresa + Mysql5 + Apache2 Suexec + Php5 on Ubuntu

    Towards the end of the tutorial, you talk about two options to point the IP the ubuntu server to the virtual host domain and you say,

    "SECOND OPTION : I use my newly installed Bind9 DNS, by adding my Ubuntu Server IP to my DNS network connexion. (in my case, I have as first DNS 192.168.0.50 and second 208.67.220.220 - the OpenDns IP)."

    I'm not sure how to use the Bind9 DNS or where to add the Server IP to my DNS network connection. Do I add it to the DNS list in the file I mentioned above, or somewhere else?

    Thanks, I feel like I'm close on this one!

    Leave a comment:


  • Emma
    replied
    Re: Install Miva Empresa + Mysql5 + Apache2 Suexec + Php5 on Ubuntu

    If your windows IP is 125.215.193.22, you'll have to use the same gateway and this would be :

    # The primary network interface
    auto eth0
    iface eth0 inet static
    address 125.215.193.50
    netmask 255.255.255.0
    network 125.215.193.50
    broadcast 125.215.193.255
    gateway 125.215.193.1
    dns-nameservers 208.67.220.220 208.67.222.222 8.8.8.8

    So your server IP will be:
    125.215.193.50

    Hope it helps ;)
    Emma

    Leave a comment:

Working...
X