-
Notifications
You must be signed in to change notification settings - Fork 175
CentOS install guide
New for 15.10 Please see CentOS README
Caveat: Below are older notes on the CentOS installation process. Not recommended.
NOTE: As of 15.04 CentOS installation is covered by the main LORIS README. Please follow the Readme and use this guide for secondary install troubleshooting assistance as needed.
This is an a guide how to get a LORIS instance Running on CentOS. It has been tested for CentOS version 6.5 for release 14.12. Status note: This guide is under development and should only be used by the Loris dev team.
Before continuing to the subsequent sections ensure that the following tools are installed. Sudo permission is required. This section covers installation and recommended versions of:
- Apache2
- PHP
- PEAR
- MySQL
- PHP Composer
- Smarty 3
The following commands assume that you are working from a bare installation of CentOS, without any of the above programs installed. Run the commands one at a time on the CentOS command-line.
sudo yum install httpd
sudo service httpd start
sudo yum install mysql-server
sudo service mysqld start
# Next command sets mysql root password, please choose one.
# enter [Y]es for all other prompts.
sudo /usr/bin/mysql_secure_installation
sudo yum install php php-mysql
sudo yum install php-pear
sudo yum install nano
sudo yum install git wget unzip
# php composer
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/bin/composer
# tell services to start on boot
sudo chkconfig httpd on
sudo chkconfig mysqld on
sudo service httpd restart
Do a test of apache and php
sudo nano /var/www/html/info.php
# paste the following into the file and save
<?php phpinfo(); ?>
then visit http://localhost/info.php or the IP address of the machine you are working on, e.g. http://192.168.33.10/info.php. You should see the php info page.
In this section we'll add a new user lorisadmin
and give it permission to do administrative tasks.
sudo useradd -U -m -s /bin/bash lorisadmin
# set the password. choose a good one.
sudo passwd lorisadmin
# grant sudo permissions to the user.
sudo nano /etc/sudoers
# the previous command will open the sudoers file for editing.
# Insert the next line into that file at line 98, then save (ctrl+o) and exit (ctrl+x).
lorisadmin ALL=(ALL) ALL
su - lorisadmin
Set the projectname
variable and folder. Choose a name for your project, e.g. myloris.
export projectname=myloris
sudo mkdir -m 775 -p /var/www/$projectname
sudo chown lorisadmin.lorisadmin /var/www/$projectname
Download the latest release from the releases page to the home directory (~/), unzip it, and copy the contents to /var/www/$projectname
. Note: Currently the CentOS installer script is only available to developers with access to the centos-installer
branch.
wget https://github.com/aces/Loris/archive/loris-14.12.zip
unzip loris-14.12.zip
cp -r Loris-loris-14.12/* /var/www/$projectname
Run installer script to install core code, libraries, and MySQL schema (see Loris Installation Schematic). The script will prompt for information, including usernames and folders which it will create automatically.
cd /var/www/$projectname/tools
./install_centos.sh **# as of 15.04: ./install.sh**
sudo service httpd restart
You can now access you LORIS sandbox using the url http://localhost/~$username/loris/htdocs
To access your sandbox on another device, replace localhost
with your IP address for your machine.