yum --installroot service httpd mysqld not recognize
When I install software apache, mysql-server or any other by specifying destination directory
Service cannot recognize There are the commands I used yum --installroot=/data install mysql-server yum --installroot=/data/ install httpd error [root@lrsxfcp19052 ~]# /sbin/service httpd start httpd: unrecognized service [root@lrsxfcp19052 ~]# /sbin/service mysqld start mysqld: unrecognized service [root@lrsxfcp19052 ~]# [root@lrsxfcp19052 ~]# df -TH Filesystem Type Size Used Avail Use% Mounted on /dev/sda1 ext4 143G 2.7G 133G 2% / tmpfs tmpfs 34G 0 34G 0% /dev/shm /dev/sdb1 ext4 2.0T 1.3G 1.9T 1% /data [root@lrsxfcp19052 ~]# Same time if I remove the software and install without specifying installroot ,it works But I want to install all the package to the new Raid Disk |
I'd really suggest you don't, but if you do need to install a standard package in a nonstandard location, then it's your responsibility to fix these things. the service command will run scripts in /etc/init.d and clearly there is no file there, and you've forced it to install in /data/etc/init.d. Note that service scripts and binary packages are NOT data, so again I'd question your logic for installing there. why not configure mysql to use that to store the database files properly?
|
Quote:
|
you really have called it /data then. Seriously though, that's not a good place to put mysql binaries. does it start if you call the script in /data/etc/init.d directly?
|
How can I redirect MySQL default database to the /data drive atleast?
|
[root@lrsxfcp19052 init.d]#
[root@lrsxfcp19052 init.d]# /data/etc/init.d/httpd start Starting httpd: /bin/bash: /usr/sbin/httpd: No such file or directory [FAILED] [root@lrsxfcp19052 init.d]# pwd /data/etc/init.d [root@lrsxfcp19052 init.d]# ls -ltr total 80 -rwxr-xr-x 1 root root 1559 May 19 2009 rdisc -rwxr-xr-x 1 root root 8630 Feb 3 2012 iptables -rwxrwxrwx 1 root root 3371 Feb 7 2012 httpd -rwxr-xr-x 1 root root 647 Apr 27 05:48 single -rwxr-xr-x 1 root root 6334 Apr 27 05:48 network -rwxr-xr-x 1 root root 5485 Apr 27 05:48 netfs -rwxr-xr-x 1 root root 2989 Apr 27 05:48 netconsole -rwxr-xr-x 1 root root 652 Apr 27 05:48 killall -rwxr-xr-x 1 root root 5777 Apr 27 05:48 halt -rw-r--r-- 1 root root 18171 Apr 27 05:48 functions -rwxr-xr-x 1 root root 2294 Jun 7 07:25 udev-post [root@lrsxfcp19052 init.d]# |
Google says you can just change the DATADIR value in my.cnf
|
Quote:
|
please provide location of my.cnf
also google link |
google is here ... http://google.com
my.cnf is usually in /etc/my.cnf or /etc/mysql/my.cnf Given the apparent need to ask these questions rather than already know the answers, or feel able to fund them yourselves I really would honestly urge you to not do any of this and install everything in default locations and then configure appropriately. |
I got it
root@lrsxfcp19052 init.d]# find / -name my.cnf /etc/my.cnf /data/mysql/etc/my.cnf /data/etc/my.cnf [root@lrsxfcp19052 init.d]# [root@lrsxfcp19052 init.d]# cat /etc/my.cnf [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid [root@lrsxfcp19052 init.d]# |
Sir, I uninstalled the package httpd,php,php-mysql,mysql-devel.mysql-server which was installed on /data.
still there are somefiles remaining on /data how can I format /data? or delete all files using single command? |
rm -rf /data/* would do that job. Noted that /lost+found will remain there, as it's a meta directory, not a real one
|
All times are GMT -5. The time now is 05:55 PM. |