• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Automatisch script voor creatie CMS dir + mysql
PostPosted: Thu Jan 18, 2018 3:05 pm 
Offline
Forum Members
Forum Members

Joined: Mon Sep 26, 2016 5:42 am
Posts: 61
Heren,

Ik zou graag een script schrijven om zaken te automatiseren.
in de /var/www/html/ staan
cmsmadesimple-1.12.2-full.tar
config.php (met drie spaties)
dit is tot op heden mijn script:
Code:
#!/bin/sh
# Zet de rechten goed van de HTML Folder

### put user in www-data group

   echo " geef de foldernaam => "
   read  folder
   sudo usermod -a -G www-data ivan
   sudo chown -R ivan:www-data /var/www/*
   sudo chmod -R 777 /var/www/*

### make folder change cursors to folder; copy cmsXX to folder cmsXX; deploy cmsXX

   mkdir /var/www/html/$folder
   cd /var/www/html/$folder
 
   echo " de folders zijn aangemaakt "
   sleep 2
 
### copy cmsmadesimple-1.12.2-full.tar to proper dir & untar cmsmadesimple-1.12.2-full.tar
 
   cp /var/www/html/cmsmadesimple-1.12.2-full.tar /var/www/html/$folder/
   tar -xvf /var/www/html/$folder/cmsmadesimple-1.12.2-full.tar 


   echo  "### Create correcte DB  "
   sleep 1
 
 
[color=#FF0000]   
        mysql> -u root@localhost -p0495Ivan;   
   mysql> CREATE $folder IF NOT EXISTS $folder;   
   exit;[/color]


Ik blij steken op de creatie van de database.
De tabellen worden aangemaakt in het cms02 install script.
Dit script heeft me een zeker automatisme.

mijn DB creatie geeft als error

Code:
### Create correcte DB
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'ivan'@'localhost' (using password: YES)
ivan@webuntu:/var/www/html$ ### Create correcte DB



waar ga ik de mist in?

Alvast bedankt.
Ivan


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Automatisch script voor creatie CMS dir + mysql
PostPosted: Thu Jan 18, 2018 7:49 pm 
Offline
Power Poster
Power Poster

Joined: Sun Apr 19, 2009 9:33 am
Posts: 1376
* Je moet in je laatste stap nog een database (-D) selecteren:

Code:
mysql -h localhost -D databasenaam -u user -p password


* Bash/SH in de mysql prompt, ik weet niet of dat gaat werken;

Code:
CREATE $folder IF NOT EXISTS $folder;


* Je kunt ook vanuit een bestand (sql.sql) importeren

Code:
mysql -h localhost -D databasenaam -u user -p password < sql.sql


Kijk ook eens naar: http://dev.cmsmadesimple.org/projects/cmscli

_________________
The CMSMS Builder is a tool to help you develop and optimize CMS Made Simple >= 2.2.3 themes, it is made by a developer for developers.

I you like an automated file based work-flow this project might be for you. It is usable to kick-start a new CMSMS project or it can be applied to existing ones.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Automatisch script voor creatie CMS dir + mysql
PostPosted: Fri Jan 19, 2018 8:47 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Apr 23, 2008 7:53 am
Posts: 7687
Location: The Netherlands
In de Engelstalige T&T board staat als ik me goed herinner ergens een dergelijk script gedeeld.

De CMSCLI module werkt alleen in CMSMS 2.x. Hoe dan ook zou ik niet meer op CMSMS 1.x ontwikkelen!

_________________
Image

Did my post help you solving a problem at your (customers) website and it saved you many hours of work? Great!! Consider buying me a cup of coffee in return!



Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting