CentOS Install



  • In my continued quest to install 0.32 on CentOS, I find that I am bit confused by the following:

    “When you install CentOS do not install any version of PHP instead: Edit the /fog_0.29/lib/redhat/config.sh file and change any reference of “php” to “php53” (this will install PHP-5.3 during the FOG install)”

    So, in the following:

    packages=“httpd php php-gd php-cli mysql mysql-server php-mysql dhcp tftp-server nfs-utils vsftpd net-tools wget xinetd tar gzip make m4 gcc gcc-c++ htmldoc perl perl-Crypt-PasswdMD5 lftp clamav”;

    Does that mean that everywhere php appears above (including php-mysql, etc.) it sould become php53-mysql or does it mean just the php standalone references.

    Thanks to all who reply,

    Steve



  • It could use some cleaning, but this is the jist.



  • Install fog

    [B]In the src directory previously created:[/B]
    [I]wget [url]http://sourceforge.net/projects/freeghost/files/latest/download?source=files[/url][/I]

    [B]Unpack:[/B]
    [I]tar xfz fog_0.32.tar.gz[/I]

    [B]cd into fog[/B]
    [I]cd fog*[/I]

    [B]remove UDPCast from bin/installfog.sh[/B]
    [I]vi bin/installfog.sh[/I]

    [B]edit lib/redhat/config.sh[/B]
    [I]vi lib/redhat/config.sh[/I]

    [B]Adjust install script:[/B]
    [I]remove php-gettext[/I]
    [I]change clamav-update to clamav[/I]
    [I]freshDB=“var/clamav/”[/I]
    [I]freshcron="/usr/bin/freshclam"[/I]

    [B]install rpcbind[/B]
    [I]yum install rpcbind[/I]

    [B]go to the install directory[/B]
    [I]cd bin[/I]

    [B]run installer:[/B]
    [I]sh installfog.sh[/I]

    ###ONCE COMPLETE###

    [B]Connect to MySQL[/B]
    [I]mysql -u root -p[/I]

    [B]Create user and give perms:[/B]
    [I]CREATE USER ‘fog’@‘localhost’ IDENTIFIED BY ‘password’;[/I]

    [B]flush the buffers:[/B]
    [I]flush privileges;[/I]

    [B]exit:[/B]
    [I]exit;[/I]

    [B]Edit /opt/fog/service/etc/config.php[/B]
    [I]vi /opt/fog/service/etc/config.php[/I]

    [B]Edit:[/B]
    [I]define( “MYSQL_HOST”, ""localhost );[/I]
    [I]define( “MYSQL_DATABASE”, “” );[/I]
    [I]define( “MYSQL_USERNAME”, “” );[/I]
    [I]define( “MYSQL_PASSWORD”, “” );[/I]

    [B]Edit /var/www/html/fog/commons/config.php:[/B]
    [I]vi /var/www/html/fog/commons/config.php[/I]

    [B]Edit:[/B]
    [I]define( “MYSQL_HOST”, “localhost” );[/I]
    [I]define( “MYSQL_DATABASE”, “fog” );[/I]
    [I]define( “MYSQL_USERNAME”, “root” );[/I]
    [I]define( “MYSQL_PASSWORD”, “root_password” );[/I]

    [B]Edit /etc/php.ini and insert:[/B]
    [I]date.timezone = “America/New_York”[/I]

    [B]Download UDPCast from repoforge repository:[/B]
    [I]wget [url]http://pkgs.repoforge.org/udpcast/udpcast-20110710-1.el6.rf.x86_64.rpm[/url][/I]

    [B]Install:[/B]
    [I]rpm -Uvh udpcast-20110710-1.el6.rf.x86_64.rpm[/I]

    [B]Setup fog for udpcasting:[/B]
    [I]vi /opt/fog/service/etc/config.php[/I]

    [B]Change:[/B]
    [I]define( “UPDSENDERPATH”, “/usr/sbin/udp-sender” );[/I]

    [B]Goto localhost/fog:[/B]
    [I]Install db[/I]

    [B]Then connect to mysql:[/B]
    [I]mysql -u root -p[/I]

    [B]Add user to db:[/B]
    [I]GRANT ALL PRIVILEGES ON fog.* TO ‘fog’@‘localhost’ IDENTIFIED BY ‘password’;[/I]

    [B]flush out buffers:[/B]
    [I]flush privileges;[/I]

    [B]exit:[/B]
    [I]exit;[/I]

    [B]Edit /opt/fog/service/etc/config.php[/B]
    [I]vi /opt/fog/service/etc/config.php[/I]

    [B]Edit:[/B]
    [I]define( “MYSQL_HOST”, ""localhost );[/I]
    [I]define( “MYSQL_DATABASE”, “fog” );[/I]
    [I]define( “MYSQL_USERNAME”, “fog” );[/I]
    [I]define( “MYSQL_PASSWORD”, “password” );[/I]

    [B]Edit /var/www/html/fog/commons/config.php[/B]
    [I]vi /var/www/html/fog/commons/config.php[/I]

    [B]Edit:[/B]
    [I]define( “MYSQL_HOST”, “localhost” );[/I]
    [I]define( “MYSQL_DATABASE”, “fog” );[/I]
    [I]define( “MYSQL_USERNAME”, “fog” );[/I]
    [I]define( “MYSQL_PASSWORD”, “password” );[/I]

    [B]restart Fog Services[/B]
    [I]/etc/init.d/FOGImageReplicator restart ;/etc/init.d/FOGMulticastManager restart ; /etc/init.d/FOGScheduler restart[/I]

    [B]restart apache[/B]
    [I]service httpd restart[/I]

    [B]restart mysql[/B]
    [I]service mysqld restart[/I]

    [B]Label both partitions for out OS:[/B]
    [I]e2label /dev/sda1 /images[/I]
    [I]e2label /dev/sda2 /storage[/I]

    [B]Add to fstab:[/B]

    [I]LABEL=/images /images ext3 defaults 0 0[/I]
    [I]LABEL=/storage /storage ext3 defaults 0 0[/I]

    [B]Mount the directories:[/B]
    [I]mount /images[/I]
    [I]mount /storage[/I]

    [B]Create the dev directory on /images[/B]
    [I]mkdir /images/dev[/I]

    [B]Create the mntcheck files[/B]
    [I]touch /images/.mntcheck /images/dev/.mntcheck[/I]

    [B]Change permissions[/B]
    [I]chown -R fog.root /images[/I]

    [B]Restart FOG Services[/B]
    [I]/etc/init.d/FOGImageReplicator restart ;/etc/init.d/FOGMulticastManager restart ; /etc/init.d/FOGScheduler restart[/I]

    [B]Change firewall settings:[/B]
    [I]vi /etc/sysconfig/iptables[/I]

    [B]Add to top:[/B]
    [I]-A INPUT -p tcp --dport 20 -j ACCEPT[/I]
    [I]-A INPUT -p tcp --dport 21 -j ACCEPT[/I]
    [I]-A INPUT -p udp --dport 69 -j ACCEPT[/I]
    [I]-A INPUT -p tcp --dport 80 -j ACCEPT[/I]
    [I]-A INPUT -p tcp --dport 111 -j ACCEPT[/I]
    [I]-A INPUT -p udp --dport 111 -j ACCEPT[/I]
    [I]-A INPUT -p tcp --dport 443 -j ACCEPT[/I]
    [I]-A INPUT -p tcp --dport 2049 -j ACCEPT[/I]
    [I]-A INPUT -p udp --dport 2049 -j ACCEPT[/I]
    [I]-A INPUT -p udp --dport 1024:65535 -j ACCEPT[/I]
    [I]-A INPUT -p udp --dport 1024:65535 -j ACCEPT[/I]

    [B]reload iptables:[/B]
    [I]service iptables restart[/I]

    [B]TO FIX SELINUX ERRORS:[/B]

    [B]Fix selinux policy by installing:[/B]
    [I]yum install policycoreutils-python[/I]

    [B]Find selinux tftpd issues:[/B]
    [I]grep tftpd_t /var/log/audit/audit.log | audit2allow -M tftplocal[/I]

    [B]Install by running:[/B]
    [I]semodule -i tftplocal.pp[/I]



  • This post is deleted!

 

374
Online

41.5k
Users

11.9k
Topics

113.3k
Posts