« MACOSX » : différence entre les versions
Ligne 6 : | Ligne 6 : | ||
* https://j2c.org/informatique/linux/postfix_relay.php | * https://j2c.org/informatique/linux/postfix_relay.php | ||
* https://gist.github.com/loziju/66d3f024e102704ff5222e54a4bfd50e | * https://gist.github.com/loziju/66d3f024e102704ff5222e54a4bfd50e | ||
* https://appletoolbox.com/seeing-error-operation-not-permitted-in-macos-mojave/ | |||
usage: postfix start (or stop, reload, abort, flush, check, status, set-permissions, upgrade-configuration) | usage: postfix start (or stop, reload, abort, flush, check, status, set-permissions, upgrade-configuration) |
Version du 18 mai 2020 à 17:10
Pour ZIP
brew install p7zip 7z x file.zip
Envoyer un email par php sous Mac OS X
- https://j2c.org/informatique/linux/postfix_relay.php
- https://gist.github.com/loziju/66d3f024e102704ff5222e54a4bfd50e
- https://appletoolbox.com/seeing-error-operation-not-permitted-in-macos-mojave/
usage: postfix start (or stop, reload, abort, flush, check, status, set-permissions, upgrade-configuration)
- postfix
- 1 sudo nano /etc/postfix/main.cf relayhost=smtp.gmail.com:587 smtp_sasl_auth_enable=yes smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd smtp_sasl_security_options=noanonymous smtp_sasl_mechanism_filter=plain smtp_use_tls=yes smtp_tls_security_level=encrypt tls_random_source=dev:/dev/urandom - 2 sudo nano /etc/postfix/sasl_passwd smtp.gmail.com:587 user:password - 3 Générer le fichier .db nécessaire au bon fonctionnement de postfix postmap /etc/postfix/sasl_passwd - 4 Autorun postfix on boot and restart postfix Copy the postfix master plist out of System folder. sudo cp /System/Library/LaunchDaemons/com.apple.postfix.master.plist /Library/LaunchDaemons/org.postfix.custom.plist sudo vi /Library/LaunchDaemons/org.postfix.custom.plist Change the label value from com.apple.postfix.master to org.postfix.custom Remove these lines to prevent exiting after 60s <string>-e</string> <string>60</string> Add these lines before </dict> <key>KeepAlive</key> <true/> <key>RunAtLoad</key> <true/> Relaunch the daemon. sudo launchctl unload /Library/LaunchDaemons/org.postfix.custom.plist sudo launchctl load /Library/LaunchDaemons/org.postfix.custom.plist ''security System Integrity Protection (SIP) démarrer le mac en recovery Pomme-R Temporarily Turn Off Your Mac’s System Integrity Protection (Recommended For Advanced Users Only!) Restart in Recovery Mode (press and hold Command + R at startup) Open the Terminal Utility Type the command csrutil disable This gives you full, unrestricted access to your Mac’s entire operating system and every file–so again, advanced users only For Terminal Users; Restart your Mac and open Terminal again Use Terminal with the commands that resulted in operation not permitted errors When done, follow steps 1-2 and turn SIP back on using the command csrutil enable Restart your Mac and SIP should be back in business'' - 4 relancer postfix sudo postfix stop sudo postfix load
Les attributs étendus
ex:-rw-rwxr–@
- dans le dossier avec terminal
xattr * (pour lister) xattr -d -r com.apple.quarantine * (pour effacer)
apache
sudo apachectl restart sudo apachectl -k restart tail -f /usr/local/var/log/httpd/error_log
homebrew
Setting up PHP & MySQL on OS X Yosemite | Rob Allen: http://akrabat.com/php/setting-up-php-mysql-on-os-x-yosemite/ http://jeffbeeman.com/node/319 https://github.com/laurentlepee/webserver-macos https://induste.com/threads/creer-son-environnement-de-developpement-web-local.575268/
- GZIP
gzip grosfichier.dmd (remplace) ou gzip -c grosfichier.dmg > grosfichier.gz (cpoie)
- APACHE
/usr/local/Cellar/httpd/2.4.41_1/homebrew.mxcl.httpd.plist $ sudo cp -v /usr/local/Cellar/httpd/2.4.41_1/homebrew.mxcl.httpd.plist /Library/LaunchDaemons $ sudo chown -v root:wheel /Library/LaunchDaemons/homebrew.mxcl.httpd.plist $ sudo chmod -v 644 /Library/LaunchDaemons/homebrew.mxcl.httpd.plist $ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.httpd.plist
- PHP
brew services restart php72
Setup PHP
sudo mkdir -p /var/log/php sudo chmod -R ugo+rw /var/log/php
Update /usr/local/etc/php/5.3/php.ini with some defaults.
error_log = /var/log/php/php.log date.timezone = "Europe/Paris"
Fix sendmail
sudo mkdir -p /Library/Server/Mail/Data/spool sudo /usr/sbin/postfix set-permissions sudo /usr/sbin/postfix start
pour mettre en pause par exemple Firefox :
killall -STOP firefox killall -CONT firefox (relancer)
ou id du processus:
kill -STOP 3221 kill -CONT 3221
supprimer .DS_Store
find . -name '*.DS_Store' -type f -delete
afficher les fichiers cachés et relancer le finder:
defaults write com.apple.finder AppleShowAllFiles 1 osascript -e 'tell app "Finder" to quit' -e 'delay 1' 'tell app "Finder" to activate'
samba3 smbup
sudo nano /opt/local/etc/samba3/smb.conf
repertoire avec caracteres spéciaux
cd "/volumes/quetchose/rep/dossier avec espace" rsync --delete -avz /Users/compte/rep/ "/volumes/quetchose/rep/dossier avec espace"/
SQL
- export
/usr/local/mysql-5.6.10-osx10.7-x86_64/bin/mysqldump --default-character-set=latin1 --host=localhost --user=compte --password=pass base > "/volumes/quetchose/rep/dossier avec espace/fichier.sql"
- import
/usr/local/mysql-5.6.10-osx10.7-x86_64/bin/mysqldump --default-character-set=latin1 --host=localhost --user=compte --password=pass base < "/volumes/quetchose/rep/dossier avec espace/fichier.sql"
- autres
find /usr -type d -name "mysql" tar -zcvf "/volumes/quetchose/rep/dossier avec espace"/fichier.tar.gz "/volumes/quetchose/rep2/dossier avec espace"/
INSTALLER mavericks
sur clé USB http://www.metronews.fr/high-tech/apple-comment-installer-la-mise-a-jour-os-x-mavericks-en-7-etapes/mmjx!jeSZ3JAcdgg/ avec DiskMaker http://liondiskmaker.com