Shell script erreur

Fermé
lPreduSl Messages postés 56 Date d'inscription dimanche 20 mars 2016 Statut Membre Dernière intervention 2 décembre 2017 - 6 oct. 2017 à 19:48
zipe31 Messages postés 36402 Date d'inscription dimanche 7 novembre 2010 Statut Contributeur Dernière intervention 27 janvier 2021 - 7 oct. 2017 à 09:55
Bonsoir,
après divers posts liés aux scripts shell sur Linux CentOS, j'en viens à un autre problème.
Sauriez-vous m'aider à résoudre ceci :
Usage: /etc/init.d/mysqld {start|stop|status|restart|condrestart|try-restart|reload|force-reload}
Usage: httpd {start|stop|restart|condrestart|try-restart|force-reload|reload|status|fullstatus|graceful|help|configtest}
chkconfig version 1.3.49.5 - Copyright (C) 1997-2000 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License.

usage: chkconfig [--list] [--type <type>] [name]
chkconfig --add <name>
chkconfig --del <name>
chkconfig --override <name>
chkconfig [--level <levels>] [--type <type>] <name> <on|off|reset|resetpriorities>
chkconfig version 1.3.49.5 - Copyright (C) 1997-2000 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License.

usage: chkconfig [--list] [--type <type>] [name]
chkconfig --add <name>
chkconfig --del <name>
chkconfig --override <name>
chkconfig [--level <levels>] [--type <type>] <name> <on|off|reset|resetpriorities>

Que j'obtiens suite à l'éxecution de ce script :
#!/bin/sh
#rpm -ihv MySQL-shared-compat-5.1.49-1.rhel5.i386.rpm
yum -y install mysql mysql-server httpd php expat
service mysqld start
service httpd start
chkconfig --levels 235 mysqld on
chkconfig --levels 235 httpd on
cd /usr/lib && cp libcrypto.so.10 libcrypto.so.6 && cp libssl.so.10 libssl.so.6
cd /usr/lib && cp libcrypto.so.10 /usr/lib64/libcrypto.so.6 && cp libssl.so.10 /usr/lib64/libssl.so.6
echo "================================================================="
echo "= Open an OTHER TERMINAL and do the following steps on it ="
echo "================================================================="
echo "You have now to create a SQL user;"
echo "Enter command mysql -u root -p;"
echo "Press Enter (no password);"
echo "Enter this command : GRANT ALL ON *.* TO 'USERNAME'@'%' IDENTIFIED BY 'PASSWORD';"
echo "Enter this command : flush privileges;"
echo "Enter this command : CREATE DATABASE newproject_data;"
echo "Enter this command : CREATE DATABASE newproject_db;"
echo "Enter this command : CREATE DATABASE newproject_db_auth;"
echo "Enter this command : CREATE DATABASE newproject_post;"
echo "Enter this command : mysql -u root -p newproject_data < newproject_data.sql;"
echo "Press enter"
echo "Enter this command : mysql -u root -p newproject_db < newproject_db.sql;"
echo "Press enter"
echo "Enter this command : mysql -u root -p newproject_db_auth < newproject_db_auth.sql;"
echo "Press enter"
echo "Enter this command : mysql -u root -p newproject_post < newproject_post.sql;"
echo "Press enter"


Ci joint une photo : https://img-19.ccm2.net/lS8HPT1WxvS3Bp7RvgB9b_tGpHw=/b29573434c26490c8edb2b8fda65127d/tmp/centos_script_error.png
A voir également:

1 réponse

zipe31 Messages postés 36402 Date d'inscription dimanche 7 novembre 2010 Statut Contributeur Dernière intervention 27 janvier 2021 6 407
7 oct. 2017 à 09:55
Salut,

Merci de rester sur le sujet d'origine : !
0