SvennD
setting up LAMP stack in crouton ChromeOS
July 27, 2015

setting up LAMP stack in crouton ChromeOS

Posted on July 27, 2015  •  1 minutes  • 181 words  •  Suggest Changes

While Its not particular difficult installing a lamp stack on Ubuntu/Debian, or Centos/RHEL; Installing it on ChromeOS/Chromebook is a bit more tricky, definitely when you want access from ChromeOS Downloads, since this is a userdir (/home/user/Downloads/).

I found this, although not very secure, working :

# install LAMP
sudo apt-get install apache2 mysql-server libapache2-mod-auth-mysql php5-mysql php5 libapache2-mod-php5 php5-mcrypt

# deploy patch 
# add to /etc/rc.local before exit 0;
/etc/init.d/apache2 start

export HOME=/etc/mysql
umask 007
[ -d /var/run/mysqld ] || install -m 755 -o mysql -g root -d /var/run/mysqld
/usr/sbin/mysqld &

# modify /etc/apache2/mods-available/userdir.conf
<IfModule mod_userdir.c>
 UserDir Downloads
 UserDir disabled root

 <Directory /home/*/Downloads>
 #AllowOverride FileInfo AuthConfig Limit Indexes
 AllowOverride All
 #Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
 Options MultiViews Indexes SymLinksIfOwnerMatch
 <Limit GET POST OPTIONS>
 Order allow,deny
 Allow from all
 </Limit>
 <LimitExcept GET POST OPTIONS>
 Order deny,allow
 Deny from all
 </LimitExcept>
 </Directory>
</IfModule>
# activate userdir mod
sudo a2enmod userdir

# restart the server
sudo service apache2 restart

# chmod is NEEDED (adapt your name)
chmod 755 /home/svenn/Downloads

# my working directory
chmod -R 755 /home/svenn/Downloads/CodeIgniter/

Now you can access your localhost : http://localhost/~user/

Support

If you enjoyed this website, consider buying me a Dr. Pepper

Buy me a Dr PepperBuy me a Dr Pepper