xibosignage / xibo

Xibo Digital Signage
https://xibosignage.com
GNU Affero General Public License v3.0
579 stars 166 forks source link

Centos 6 setup instructions HERE #263

Closed andyblackham closed 9 years ago

andyblackham commented 9 years ago

Hi Everyone I have just installed Xibo on a Dell PowerEdge 2600 server I got off ebay for £25. It's a bit old and only has a CD drive with no USB boot, so I can only get a CentOS 6 minimal install CD for OS installation.

These are the commands I've used to get it working... hope they help you. Comments welcome.

commands to prepare a vanilla Minimal Centos 6 installation of Xibo 1.7.1 this is not a script, it's the process I go through to set a stable Xibo server running on Centos 6 minimal install. I have not fully explained all the setup steps like which lines to edit in the sysconfig ethernet script etc. Google it if you get stuck

Built-in ethernet is not setup on a fresh install, lets change to DHCP

vi /etc/sysconfig/network-scripts/ifcfg-eth0

Set the machines hostname

hostname XiboCMS

Disable Security Enhanced Linux and turn off the firewall

vi /etc/sysconfig/selinux
service iptables stop
chkconfig iptables off

restart network services to acquire an IP address

service network restart

update any base components

yum update -y

install some basic tools for a happy system admin

yum install nano wget bash-completion ntp ntpdate -y

set the date and time, then start nptd to keep it in sync

ntpdate
service ntpd start
chkconfig ntpd on

We need additional repositories, lets add them in

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

install apache (httpd) PHP and mySql server

yum install httpd php-devel mysql mysql-server json json-c
yum install php php-cli php-common php-devel php-pdo php-soap php-mysql php-mcrypt* php-common php-cli php-devel php-fpm php-gd php-imap php-intl php-mysql php-process php-xml php-xmlrpc php-zts

configure apache and set to start on boot

nano /etc/httpd/conf/httpd.conf
chkconfig httpd on

start mysql, configure and set to autostart on boot

service mysqld start
mysql_secure_installation
chkconfig mysqld on

edit this

nano /etc/php.d/json.ini

edit config php to suit

nano /etc/php.ini

at this point, your server is on your network the hostname, date & time are set you have a basic webserver installed with PHP and Mysql you know a mysql username and password the Xibo specific PHP modules are all installed php has been set to allow larger than normal uploads (necessary for large video files).

Now download and install xibo into the standard webroot

cd /var/www/html
wget https://github.com/xibosignage/xibo-cms/archive/1.7.1.tar.gz
sudo tar zxvf 1.7.1.tar.gz
sudo mv xibo-cms-1.7.1 xibo
chmod 777 -R xibo
cd ../..
mkdir xibo-library
chmod 777 xibo-library

now check your servers IP address with:

ifconfig | grep inet

it will show you, maybe the last line.

then visit http://<youripaddress>/xibo and begin the setup

Once it's running, I generally change the webroot directory in httpd.conf to /var/www/html/xibo so the access address is simply http://<youripaddress>

andyblackham commented 9 years ago

this is not formatted like I laid it out in a text editor. Sorry.

dasgarner commented 9 years ago

I tidied it up a bit for you...

It would be nice if this was a guide in the manual, if you fancied putting it in there (better than an open issue)

andyblackham commented 9 years ago

I'd be pleased to do that... let me check it out.

Great work by the way... Wish I'd been on this before.

dasgarner commented 9 years ago

you're welcome.

if you can't fathom how to get it into the manual then let me know and I will try to expand the instructions. It would also be good if you could sign the CLA (as this is a fairly substantial contribution).

Speedy-Gonzalez commented 9 years ago

Thanks for your good work!

But is it right to advise server administrators to disable SELinux or the firewall? Disable Security Enhanced Linux and turn off the firewall vi /etc/sysconfig/selinux service iptables stop chkconfig iptables off

Maybe you mark this statement with an "attention" label or a link to a good SELinux or iptables manual, because you could get a working Xibo even with SELinux or firewall enabled.

andyblackham commented 9 years ago

That’s a good question. I disabled it because I couldn’t make a connection, but in the end it was the IP tables firewall.

Maybe it can come out? andy

andyblackham commented 9 years ago

Having thought about this, perhaps the whole issue of security needs a separate page.

If you know what SE Linux is and how to configure it, you probably don't need a guide! Same for IPTables.

I couldn't configure the firewall because I have no idea what ports are used / required by Xibo. I could not access the web server or the mySQL db, so 80 and 3306 were clearly blocked but do the clients need additional ones?

I will get another pc out, minimal install it and try it all again.

dasgarner commented 9 years ago

Only 80 is needed externally (or the port your web server is running on) - you don't need to open up the DB to anything bar localhost.

Speedy-Gonzalez commented 9 years ago

@andyblackham You are right. When someone knows how to setup a correct SELinux or iptables configuration, no guide is needed.

I don't think iptables (or firewalls) are the problem at all. A admin should at least have a little clue what firewalls do and how to config them (or a colleague / person he knows :smile: ). SELinux is the far bigger problem because it is very complex.

But I think, like you said, that a separate security page could be the right thing. At least a advice is needed, that disabling such things may cause a higher risk getting hacked or wathever you may call it.

andyblackham commented 9 years ago

I have forked the manual and made some edits. Can people take a look and feedback please?

https://github.com/andyblackham/xibo-manual/blob/develop/source/en/install_environment_centos6.md

dasgarner commented 9 years ago

I'm not sufficiently familiar with centos to comment, however I can offer some "manual specific" points:

I will leave the technical critique of the actual article to someone who knows what they are talking about :smile:

andyblackham commented 9 years ago

Thanks – done, but how do I enter the URL of the instructions page in a dynamic way that still works when pulled? Or do I need to work out what the correct address will be in advance?

a

dasgarner commented 9 years ago

The whole thing is relative, so you would just set the address to install_environment_centos6.html

dasgarner commented 9 years ago

I am closing this issue because we have moved all discussion and support to community.xibo.org.uk and would like to tidy up GitHub so we can use this as a bug tracker only. If you are still having a problem, please repost on the community site and please update your bookmarks for future questions!